package org.edu.service;



import java.util.List;

import org.edu.bean.Role;
import org.edu.bean.Role_user;
import org.edu.bean.User;

public interface UserService{
	
	/**
	 * @exception ��½
	 * @param systemNumber
	 * @param pass
	 * @return
	 */
	public User login(String systemNumber, String pass);
	
	/**
	 * @exception �����û�
	 * @param user
	 * @return
	 */
	public Integer createUser(User user);
	
	/**
	 * 
	 * @exception ��ѯ���еĽ�ɫ
	 * @return
	 */
	public List<Role> getAllRoles();
	/**
	 * 
	 * @exception �û���ӽ�ɫ
	 * @param userId
	 * @param roleIdStrs
	 */
	public void userAddRole(int userId , String [] roleIdStrs) ;
	
	/**
	 * @exception ����û���ɫ
	 * @param roleUser
	 */
	public void userAddRole(Role_user roleUser) ;
	
	/**
	 * 
	 * @exception ��ѯ�û�
	 * @param user
	 * @return
	 */
	public List<User> selectUsers(User user);
	
	/**
	 * @exception ɾ��user
	 * @param user
	 */
	public void delUser(User user) ;
	/**
	 * @exception ��ѯuser 
	 * @param userId
	 * @return
	 */
	public User selectUserByUser(int userId) ;
	
	/**
	 * @exception ����user
	 * @param user
	 * @return
	 */
	public boolean updateUser(User user);
	
	/**
	 * @exception ��� urse id role id  ��ѯ role_user
	 * @param userId
	 * @param roleId
	 * @return
	 */
	public List<Role_user> selectRoleUsers(int userId, int roleId) ;
	
	public void delRole_user (Role_user roleUser);
	/**
	 * 通过id返回对象
	 * @param clazz
	 * @param Id
	 * @return
	 */
	public Object findById(Class clazz,int Id);
	
	public Object findUsInfoByUserId(int id);
	
	public Object saveOrUpdate(Object obj);
}